#include <bits/stdc++.h>

using namespace std;
class Element {
public:
    int id;
    Element(int _num = 0) :id(_num) { ; }
    Element(const Element &_e) :id(_e.id) { ; }
    Element &operator=(const Element &other) { this->id = other.id; return *this; }
    bool operator<(const Element &other) {
        return this->id < other.id;
    }
    bool operator<=(const Element &other) {
        return this->id <= other.id;
    }
    bool operator>=(const Element &other) {
        return !(*this < other);
    }
    bool operator>(const Element &other) {
        return !(*this <= other);
    }
    bool operator==(const Element &other) {
        return this->id == other.id;
    }

    bool operator!=(const Element &other) {
        return !(*this == other);
    }
};
struct TreeNode {
public:
    Element e;
    TreeNode *father, *left, *right;
    double priorty;//越小优先级越高
    TreeNode(const Element &_e) :father(nullptr), left(nullptr), right(nullptr) {
        e = _e;
    }
    TreeNode(const TreeNode &node) :father(node.father), left(node.left), right(node.right) {
        e = node.e;
    }
}*root;
int main() {
    TreeNode *p1 = new TreeNode(Element(1));
    TreeNode *p2 = new TreeNode(Element(2));
    TreeNode *p3 = new TreeNode(Element(3));
    p1->left = p2;
    p1->right = p3;
    p2->father = p1;
    p3->father = p1;
    cout << " " << p3 << endl;
    TreeNode **pp = &p3;
    delete *pp;
    *pp = nullptr;
    cout << (p1->right) << " " << p3 << " " << &p3;
        //system("pause");
    return 0;
}
